]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionUtils: don't log verbosely on missing extension directory
authorOwen W. Taylor <otaylor@fishsoup.net>
Thu, 4 Oct 2012 04:57:06 +0000 (00:57 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Fri, 5 Oct 2012 17:08:02 +0000 (13:08 -0400)
A missing extension directory isn't worth debug spew, so check
if the error when reading the extension directory is NOT_FOUND,
and if so, suppress output.

https://bugzilla.gnome.org/show_bug.cgi?id=685466

js/misc/extensionUtils.js

index 40e001bbe017689205eec614e4e6cf33b2de84f0..e0969c45cde88f4db1dae780cd41f1b2d27e90d1 100644 (file)
@@ -161,7 +161,8 @@ const ExtensionFinder = new Lang.Class({
         try {
             fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
         } catch(e) {
-            logError(e, 'Could not enumerate extensions directory');
+            if (e.domain != Gio.io_error_quark() || e.code != Gio.IOErrorEnum.NOT_FOUND)
+                logError(e, 'Could not enumerate extensions directory');
             return;
         }